dayday001 = 1.01 ** 365
print(dayday001)


def df(fac, days):
    dayup = 1.0
    for x in range(days):
        if x % 7 in [6, 0]:
            dayup *= (1 - fac)
            # pass
        else:
            dayup *= 1 + fac
    return dayup


dayup = df(0.01, 365)
print("一年后:{:.2F}".format(dayup))
for x in range(1, 10000):
    fac=x/10000;
    if df(fac, 365) > dayday001:
        print(fac, df(fac, 365))
        break
